#-------------------------------------------
# VisualK-OS                                
#    Module: Flood Bank Array Driver [v2.0] 
#    Author: Kevin Slaughter                
#-------------------------------------------

"""
[Revision History]
    v2.0: Standardization, misc. optimizations.
    v1.0: Initial implementation.
"""



### Lib/Header import
from VKCC_Constants import *
import globals, serial

### Obj: Flood Bank Array COMMS --- [Stage-wide RGB LED Flood light boards]
class cFBA(object):
    ### [General]
    ID = "FBA"                  # Debug reference
    devPath = "/dev/vkosFBA"    # Device path [Linux]
    isAvailable = False		# Status indicator
    isHandshook = False		# ^      ^      ^
    isMuted = False	        # All lights off, regardless of commands received.
    numLights = 9	        # Zero-based (Current cfg: 8x[RGB] + 1x[W])
    serComms = serial.Serial    # Serial connection object to device.



    ### [Functions]
    ### cfgLight(): Configure color of RGB lamp
    def cfgLight(self, iLight, iH, iS, iV):
        """
        Configure the color of a given RGB lamp, using HSV color information.
        """
        # TODO: Set x-light's HSV properties, send updated cfg to device
        return
    